package com.zy.dp.iterator.example5;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class PayManager extends Aggregate
{
	private List<PayModel> list = new ArrayList<PayModel>();

	public List<PayModel> getPayList()
	{

		return list;
	}

	public void calcPay()
	{
		PayModel pm1 = new PayModel();
		pm1.setPay(3900);
		pm1.setUserName("张三");

		PayModel pm2 = new PayModel();
		pm2.setPay(4500);
		pm2.setUserName("李四");
		list.add(pm1);
		list.add(pm2);

	}

	@Override
	public Iterator<PayModel> createIterator()
	{
		return list.iterator();
	}

}
